<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="PHP ASP MySql PPC 网络 数据库 YAOYOA" />
<meta name="description" content="YAOYOA的个人网站 PHP/ASP/MySql/数据库/数码资讯" />
<link href="css/common.css" rel="stylesheet" type="text/css"/>
<link href="css/photo.css" rel="stylesheet" type="text/css"/>
<link href="css/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css"/>
<title>photo</title>
</head>
<body>
<div id="page_ctn">
	<div id="content_ctn">
		<div id="login_bg" class="clearfix">
		</div>
		<div id="photo_list_ctn">
			<ul class="clearfix">
<?php 
require_once('include/class.php');
$dd=new data();
$a=db_result_to_array($dd->preview(false,'file',null,null,'catalog_id=18'));
//print_r(db_result_to_array($a));
foreach ($a as $key=>$val){
	echo '<li><a href="dl.php?id='.$val['id'].'&t=b"><img src="dl.php?id='.$val['id'].'&t=s"/></a></li>';
}
?>
			</ul>
		</div>
	</div>
	<div id="pagination_ctn"><a class="c" href="javascript:void(0)"></a><a href="javascript:void(0)"></a><a href="javascript:void(0)"></a></div>
	<div id="login_ctn">
		<form>
		<label>请输入您的真实姓名：<br/><i class="tip">以确定访问权限</i></label><input class="name" name="guest_name" /><button type="submit"></button>
		</form>
	</div>
</div>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery.lightbox-0.5.min.js"></script>
<script type="text/javascript" src="js/YY_dialog.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript">
$(function(){
	$('#photo_list_ctn ul li a').lightBox();
	
});
set_window();
//show_login();
$('#login_ctn button').click(function(){
});
var obj=$('#photo_list_ctn li');
var show_pic=new water_fall(obj);
$('#pagination_ctn a').live('click',function(){
	var obj=$(this);
	if (obj.hasClass('c'))
		return false;
	else{
		$('#pagination_ctn a').removeClass('c');
		obj.addClass('c');
	}
	var p=$('#pagination_ctn a').index(obj)+1;
	show_pic.flip_page(p);
});
$(window).scroll(function(){show_pic.init();}).resize(function(){show_pic.init();set_window();});
$('form').submit(function(){
	var name=$('#login_ctn input').val();
	if (name=='')return false;
	$('#login_ctn button').attr('disabled','disabled').addClass('loading');
	$.get('/ajax_response.php',{type:'login',name:name},function(data){
		if (data=='1'){
			$('#login_ctn').fadeOut();
			var load=new show_loading();
			$('#login_ctn button').removeAttr('disabled');
			$.get('/ajax_response.php',{type:'login',name:name},function(data){
				if (data=='1'){
					logined=true;
					load.stop();
					$('#login_bg').fadeOut();
				}
			});
		}
	});
	return false;
});
$('#login_bg').fadeOut();
/*
var load=new show_loading();
var img = new Image();
$(img).load(function(){
	load.stop();
	$('#login_bg').hide().css('background','url("dl.php?id=2") center no-repeat').fadeIn();
}).attr("src", 'dl.php?id=2');
*/
</script>

</body>
</html>
